package com.university.report.user.handler;

import com.university.report.user.service.UserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @ClassName health_report
 * @Author Jinondo
 * @Date 2021/6/13 9:42
 */
@Component
@Slf4j
public class ReSetIScheduledTasks {

    @Autowired
    UserService userService;

    private ReSetIScheduledTasks(){
    }

    @Scheduled(cron = "59 59 23 * * *")
    public void reSetReportStatus(){
        if (userService==null){
            log.info("===== userService is null =====");
            return;
        }
        userService.reSetReportStatus();
    }

}
